<template>
  <span>{{text}}</span>
</template>

<script>
const api = window.$api.wordPrint.template;
export default {
  name: "l-wordprint-label",
  props: {
    value: {},
  },
  data() {
    return {
      text:''
    };
  },
  computed: {
  },
  watch: {
    value: {
      handler() {
        this.setText();
      },
      immediate: true,
    },
  },
  mounted() {
  },
  methods: {
    async setText() {
      let value = this.value;
      if(this.$validatenull(value)){
          this.text = ''
      }
      else {
        let select = await this.$awaitWraper(api.getByCode(value));
        this.text = select.f_Name;
      }
    }
  },
};
</script>
